﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Logs.aspx.cs" Inherits="SoftwareEngineering_Project.Logs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">

        .style1
        {
            color: #000000;
        }
        .style5
        {
            color: #990000;
        }
        .style6
        {
            color: #800000;
        }
        .style7
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Log transactions:</h2>
    <p align="center">
    <asp:GridView ID="GridView_Logs" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
        DataKeyNames="TransactionID" CellPadding="4" ForeColor="#333333" Width="866px">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:BoundField DataField="TransactionID" HeaderText="TransactionID" 
                SortExpression="TransactionID" InsertVisible="False" ReadOnly="True" />
            <asp:BoundField DataField="Description" HeaderText="Description" 
                SortExpression="Description" />
            <asp:BoundField DataField="User" HeaderText="User" 
                SortExpression="User" ReadOnly="True" />
            <asp:BoundField DataField="TransactionDate" HeaderText="TransactionDate" 
                SortExpression="TransactionDate" />
        </Columns>
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
    </p>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:s-cheduleDBConnectionString %>" 
        SelectCommand="SELECT Sys_Transaction.TransactionID, Transaction_Type.Descr AS Description, SysUser.UserName + '(' + Employee.FName + ' ' + Employee.LName + ')' AS [User], Sys_Transaction.TransactionDate FROM Transaction_Type INNER JOIN Sys_Transaction ON Transaction_Type.TypeID = Sys_Transaction.TypeID INNER JOIN Employee ON Sys_Transaction.Username = Employee.Employee_ID INNER JOIN SysUser ON Employee.Employee_ID = SysUser.Employee_ID">
    </asp:SqlDataSource>
    <%--<table class="style7">
        <tr>
            <td style="text-align: center">
                <asp:Button ID="Button2" runat="server" ForeColor="Maroon" Text="Print" 
                    Width="104px" style="text-align: center" />
            </td>
        </tr>
    </table>--%>
</asp:Content>
